package org.hxzon.workeasy.permissions;

import org.hxzon.workeasy.model.EasyFile;
import org.hxzon.workeasy.model.EasyUzer;
import org.hxzon.workeasy.permissions.base.BasePermissions;
import org.hxzon.workeasy.permissions.base.PermissionsChecker;

public class FileDeletePermissions extends BasePermissions<EasyFile> {
    public FileDeletePermissions() {
        addChecker(new PermissionsChecker<EasyFile>() {
            public boolean check(EasyFile target, EasyUzer user) {
                if (target.getUsername().equals(user.getUsername())) {
                    return true;
                }
                return false;
            }
        });
    }
}
